package top.hg.tool.modules.car.article;

import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * created by skh on 2019/7/23
 */
@Data
@TableName("tb_article")
public class ArticleEntity {

	@ApiModelProperty("主键")
	private Integer id;

	@ApiModelProperty("标题")
	@NotBlank(message = "标题不能为空")
	private String title;

	@ApiModelProperty("作者")
	@NotBlank(message = "作者不能为空")
	private String author;

	@ApiModelProperty("内容")
	@NotBlank(message = "内容不能为空")
	private String content;

	@ApiModelProperty("创建时间")
	@NotNull(message = "创建时间不能为空")
	@JsonFormat( pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date createTime;

	@ApiModelProperty("图片")
	private String images;

	@ApiModelProperty("阅读量")
	private Integer readCount;
}
